<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>个人信息</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#oldPassword").focus();
			$("#inputForm").validate({
				rules: {
				},
				messages: {
					confirmNewPassword: {equalTo: "输入与上面相同的密码"}
				},
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
	<jsp:include page="/WEB-INF/views/include/pageJs.jsp" />
</head>

<body class="childrenBody">

<form:form id="inputForm" modelAttribute="user" action="${ctx}/sys/user/modifyPwd" method="post" class="layui-form changePwd">
	<!--<div style="margin:0 0 15px 110px;color:#f00;">旧密码请输入“123456”，新密码必须两次输入一致才能提交</div>-->
	<form:hidden path="id"/>
	<sys:message content="${message}"/>
	
	<div class="layui-form-item" style="padding-top: 50px;">
		<label class="layui-form-label">用户名</label>
		<div class="layui-input-inline layui-input-inline-one">
			<input type="text" value="${fns:getUser().loginName}" disabled class="layui-input layui-disabled">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label"><font color="red">*</font>旧密码</label>
		<div class="layui-input-inline layui-input-inline-one">
			<input id="oldPassword" name="oldPassword" type="password" value="" maxlength="50" minlength="3" class="layui-input pwd required" placeholder="请输入旧密码" >
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label"><font color="red">*</font>新密码</label>
		<div class="layui-input-inline layui-input-inline-one">
		    <input id="newPassword" name="newPassword" type="password" value="" placeholder="请输入新密码" maxlength="50" minlength="3" class="layui-input required"/>
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label ">确认密码</label>
		<div class="layui-input-inline layui-input-inline-one">
		    <input id="confirmNewPassword" name="confirmNewPassword" placeholder="请确认密码" type="password" value="" maxlength="50" minlength="3" class="layui-input required" equalTo="#newPassword"/>
		</div>
	</div>
	<div class="layui-form-item">
		<div class="layui-input-block">
			<button class="layui-btn"  type="submit">保存</button>
			<button type="reset" class="layui-btn layui-btn-danger">重置</button>
		</div>
	</div>
</form:form>
</html>